<template>
  <el-card style="width: 100%; height: 550px ">
    <div id="userTrend" style="width: 100%;height: 550px"></div>
  </el-card>

</template>

<script>

export default {
  name: "UserTrend",
  props:{
    userTrendData:{}
  },
  data() {
    return {
    }
  },
  created() {
    this.$nextTick(function (){
      let echartsInstance = this.$echarts.init(document.getElementById("userTrend"))
      this.showEcharts(echartsInstance)
    })


  },
  methods:{

    showEcharts(echartsInstance){
      console.log(this.analysisData)
      echartsInstance.setOption({
        xAxis: {
          type: 'category',
          data: this.userTrendData.date
        },
        yAxis: {
          type: 'value'
        },
        series: [
          {
            data: this.userTrendData.userNumber,
            type: 'line',
            smooth: true
          }
        ]
      })
    }
  }
}
</script>

<style scoped>

</style>
